package com.yhy.configclientkafka.controller;

import com.yhy.configclientkafka.DubboInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * describe:
 *
 * @author helloworldyu
 * @date 2018/6/7
 */
@RefreshScope
@RestController
public class HelloUrlController {
	@Autowired
	private DubboInfo dubboInfo;

	@Value("${env}")
	String env;

	@GetMapping("/dubbo")
	public String getUrl(){
		return dubboInfo.toString()+ env;
	}
}